You are here: Scripting Reference > Variables > Local Globals

Local Globals

Local Globals are global variables that can be defined by the user but are limited in scope to a single execution of an Action. They are always of type Variant.

They are local globals because they are global only within a single execution of an Action. A local global can be referenced from any object so long as it is executing within the same Action.

Local Globals are not Persistent. They are persistent across the entire execution of an Action, but are reset for each new execution of the same Action.

Care should be taken when using local globals that you don't use the same local global for different purposes within the same Action. It would cause a conflict as to the value you expect within the local global at any one time.

Local Globals are referenced like fields through the special Locals array. Their value can be accessed through the properties .Value, .AsString, .AsInteger, and .AsFloat (Refer to See "Referencing Fields" for information on how these properties work with fields - it is the same for local globals).

ClosedSetting a local global
ClosedReading a local global
ClosedReading a local global using Tags
ClosedSpecifying a display format for AsString and Tags
ClosedRemoving a local global
ClosedClear all local globals